using System;
using ACS.Compiler.Tables;
using ACS.Compiler.Tables.Modes;

namespace ACS.Compiler.Tree.Impl
{
    public class StringConst : Expression
    {
        private string _value;

        public override void Build()
        {
            _value = getFirstChild().ToString();                        
        }

        public override Expressions ExpressionType
        {
            get { return Expressions.StringConst; }
        }

        public override Mode Mode
        {
            get
            {
                return StringMode.Instance;
            }
        }


        public string Value
        {
            get { return _value; }
        }

        public override void Resolve(string ns, DataTable localData)
        {
            // do nothing.
        }

        public override string ToDeclareString()
        {
            return Value  ;
        }
    }
}